<% status = STATUS_CODES.select{|s| s[:db_code] == task.status_code}.first[:text] %>
<%= "<tr id=\"task_#{task.id}\">" if row_wrap %>
  <td class="title"><%= task.title %></td>
  <td class="sub_contractor_id"><%= task.sub_contractor.name %></td>
  <td class="started_on"><%= task.started_on.to_s(:long) %></td>
  <td class="status_code"><span class="<%= status.downcase %>"><%= status %></span></td>
  <td class="completed_on">
    <% if status == "Complete" %>
      <%= task.completed_on.to_s(:long) %>
    <% else %>
      <span class="quiet">not quite!</span>
    <% end %>
  </td>
  <% if show_actions %>
    <td class="actions">
      <%= link_to_remote "Edit", :update => "task_form_row", :url => show_remote_form_admin_milestone_task_url(task.milestone, task), :method => :get, :html => { :class  => "task_action", :onclick => "$j('#task_#{task.id} td').addClass('highlight')" } %> | 
      <%= link_to_remote 'Delete', :url => admin_task_url(task.id), :method => :delete, :confirm => "Are you sure?", :html => {:class  => "task_action"} %>
    </td>
  <% end %>
<%= "</tr>" if row_wrap %>